<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

include APPPATH."libraries/mandrill/Mandrill.php";

class My_mandrill {
  protected $api_key;
  private $mandrill;

  public function __construct($config)
  {
    // Obtiene la instancia de condeigniter
    $this->CI =& get_instance();
    $this->mandrill = new Mandrill($config['apikey']);

    log_message('debug', "My_mandrill Class Initialized");
  }

  public function send($params){
      return $this->mandrill->messages->send($params);
  }

}